import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import Vant from 'vant'
import 'vant/lib/index.css'

import 'amfe-flexible'

import './styles/index.less'

import dayjs from 'dayjs'
// 注册相对时间的插件
import relativeTime from 'dayjs/plugin/relativeTime'
// 国际化,设置中文
import 'dayjs/locale/zh-cn'
dayjs.extend(relativeTime)
dayjs.locale('zh-cn')
// 定义全局过滤器
Vue.filter('relativeTime', d => dayjs().to(dayjs(d)))

Vue.use(Vant)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
